﻿using Examination.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace Examination.Args.Request
{
    public class AddQuestionParameter
    {
        [Required]
        [MaxLength(500)]
        public string Title { get; set; }

        public QuestionType Type { get; set; } = QuestionType.Radio;

        [Required]
        [MaxLength(100)]
        public string Answer { get; set; }

        [MaxLength(100)]
        public string Option1 { get; set; }

        [MaxLength(100)]
        public string Option2 { get; set; }

        [MaxLength(100)]
        public string Option3 { get; set; }

        [MaxLength(100)]
        public string Option4 { get; set; }

        public override string ToString()
        {
            return $"{{{nameof(Title)}={Title}, {nameof(Type)}={Type.ToString()}, {nameof(Answer)}={Answer}, {nameof(Option1)}={Option1}, {nameof(Option2)}={Option2}, {nameof(Option3)}={Option3}, {nameof(Option4)}={Option4}}}";
        }
    }
}
